package com.market.mapper;


import com.market.entity.Brand;
import com.market.entity.Classes;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface BrandMapper {

    List<Brand> selectList();

    /**
     * 查询品牌名
     *
     * @return
     */
    List<Brand> selectNames();

    /**
     * 查询品牌ID
     * @param commodityBrandId
     * @return
     */
    Brand selectId(Long commodityBrandId);

    /**
     * 修改商品名
     * @param brandId
     * @param brandName
     * @return
     */
    int updateBrand(@Param("brandId") Integer brandId, @Param("brandName") String brandName);

    /**
     * 添加品牌
     * @param brandName
     * @return
     */
    int insert(@Param("brandName") String brandName);

    /**
     * 删除品牌
     * @param brandId
     * @return
     */
    int deleteBrand(@Param("brandId") Integer brandId);

    /**
     * 搜索功能
     *
     * @param namesOrId
     * @return
     */
    List<Brand> selectNamdesOrId(@Param("namesOrId") String namesOrId);

}
